document.querySelector('.upBtn').addEventListener('paste',function(e){
			 var cbd = e.clipboardData;
			    var ua = window.navigator.userAgent;
			    // 如果是 Safari 直接 return
			    if ( !(e.clipboardData && e.clipboardData.items) ) {
			        return ;
			    }
			    // Mac平台下Chrome49版本以下 复制Finder中的文件的Bug Hack掉
			    if(cbd.items && cbd.items.length === 2 && cbd.items[0].kind === "string" && cbd.items[1].kind === "file" &&
			        cbd.types && cbd.types.length === 2 && cbd.types[0] === "text/plain" && cbd.types[1] === "Files" &&
			        ua.match(/Macintosh/i) && Number(ua.match(/Chrome\/(\d{2})/i)[1]) < 49){
			        return;
			    }
			
			    for(var i = 0; i < cbd.items.length; i++) {
			        var item = cbd.items[i];
			        if(item.kind == "file"){
			            var blob = item.getAsFile();
			            if (blob.size === 0) {
			                return;
			            }
			            // blob 就是从剪切板获得的文件 可以进行上传或其他操作
						var data = new FormData();
						data.append('pic', blob);
						$.ajax({
						    url: '/ps/task/addPicjson',
						    type: 'POST',
						    dataType:'json',
						    cache: false,
						    data: data,
						    processData: false,
						    contentType: false,
						    success:function(res){
						    	var wrap = document.querySelector('.upBtn');
							    var file = res.data.toString();
							    var img = document.createElement("img");
						        img.src = $('#picUrl').val()+file;
						        console.log(img.src);
						        if(Boolean(res)){
						        	$('#upImg').val(file);
						        }
								wrap.appendChild(img);
						    },error:function(){
						    	
						    }
						})
			        }
			    }
			}, false);
		function insertHtmlAtCaret(html) {
			var sel, range;
			if (window.getSelection) {
				// IE9 and non-IE
				sel = window.getSelection();
				if (sel.getRangeAt && sel.rangeCount) {
					range = sel.getRangeAt(0);
					range.deleteContents();
					// Range.createContextualFragment() would be useful here but is
					// non-standard and not supported in all browsers (IE9, for one)
					var el = document.createElement("div");
					el.innerHTML = html;
					var frag = document.createDocumentFragment(), node, lastNode;
					while ( (node = el.firstChild) ) {
						lastNode = frag.appendChild(node);
					}
					range.insertNode(frag);
					// Preserve the selection
					if (lastNode) {
						range = range.cloneRange();
						range.setStartAfter(lastNode);
						range.collapse(true);
						sel.removeAllRanges();
						sel.addRange(range);
					}
				}
			} else if (document.selection && document.selection.type != "Control") {
				// IE < 9
				document.selection.createRange().pasteHTML(html);
			}
		}